package com.bckj.fastboot.auth.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.bckj.fastboot.auth.model.LoginRequest;
import com.bckj.fastboot.auth.model.LoginResponse;
import com.bckj.fastboot.auth.service.AuthService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/auth")
public class AuthController {

    private final AuthService authService;

    /**
     * 登录
     */
    @SaIgnore
    @RequestMapping("/login")
    public LoginResponse login(LoginRequest request) {
        return authService.login(request);
    }
}
